export const http = (url,data={},method='get')=>{
	return new Promise((reslove,reject)=>{
		uni.request({
			url,
			data,
			method,
			 header: {
			        'Authorization': uni.getStorageSync('token') //自定义请求头信息
			    },
			    success: (res) => {
			        // console.log(res.data);
			        reslove(res.data)
			    },
				fail:(error)=>{
					reject(error)
			}
		})
	})
}
export const get = (url,data={})=>{
	return http(url,data)
}
export const post = (url,data={})=>{
	return http(url,data,'post')
}